<template>
  <div class="login">
    跳转中。。。。
    <!--  底部  -->
    <div class="el-login-footer">
      <span>Copyright © 2018-2022 yegs All Rights Reserved.</span>
    </div>
  </div>
</template>

<script>
import { getCodeImg, getSchools } from '@/api/login'
import Cookies from "js-cookie";
import { encrypt, decrypt } from '@/utils/jsencrypt'

export default {
  name: "skip",
  data() {
    return {
      loginForm:{
        username: "admin",
        password: "yegs!@#$",
        schoolid:''
      }
    };
  },
  watch: {
    $route: {
      handler: function(route) {
        this.loginForm.username = route.query && route.query.username;
        this.loginForm.schoolid = route.query && route.query.schoolid;
      },
      immediate: true
    }
  },
  created() {
    this.handleLogin();
  },
  methods: {
    handleLogin() {
      console.log(this.loginForm)
      this.$store.dispatch("Login", this.loginForm).then(() => {
        this.$router.push({ path: this.redirect || "/" }).catch(()=>{});
      }).catch(() => {
        console.log(1)
      });
    }
  }
};
</script>

<style rel="stylesheet/scss" lang="scss">

</style>
